﻿<UserControl x:Class="LFSRecord2.View.TimelineStructures.TimeSelectionGridItem"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="95" d:DesignWidth="150" Loaded="UserControl_Loaded">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="75" />
            <RowDefinition Height="20" />
        </Grid.RowDefinitions>
        
        <Border Grid.Row="0" BorderThickness="2" BorderBrush="#FF8D8D8D">
            <Grid ClipToBounds="True" Background="Transparent" MouseLeftButtonDown="SelectionGridItem_MouseLeftButtonDown">
                <Rectangle Name="HeaderRect" Height="20" Fill="CornflowerBlue" VerticalAlignment="Top" IsHitTestVisible="False" />
                <TextBlock Name="HeaderText" Margin="5, 1, 0, 0" />
                <TextBlock Name="IDCharacter"
                       Margin="0,15,0,0"
                       HorizontalAlignment="Center"
                       VerticalAlignment="Center" 
                       FontSize="26" FontWeight="Bold"
                       IsHitTestVisible="False"/>

                <Rectangle Name="ProjectTimeRectangle" 
                       Width="10" Height="71" 
                       Fill="#5FD0D0D0"
                       HorizontalAlignment="Left" />

                <Canvas Name="StartIndicator" HorizontalAlignment="Left" Margin="0,0,0,0">
                    <Line X1="0.5" 
                      X2="0.5" 
                      Y1="0" 
                      Y2="71" 
                      Stroke="Black" MouseLeftButtonDown="StartIndicator_MouseLeftButtonDown" />
                    <Polygon Fill="Red" Points="0.5,0 7,0 0.5,8" MouseLeftButtonDown="StartIndicator_MouseLeftButtonDown" />
                    <Polygon Fill="Red" Points="0.5,71 7,71 0.5,63" MouseLeftButtonDown="StartIndicator_MouseLeftButtonDown" />
                </Canvas>
                <Canvas Name="EndIndicator" HorizontalAlignment="Right" Margin="0,0,0,0">
                    <Line X1="-0.5" 
                          X2="-0.5" 
                          Y1="0" 
                          Y2="71" 
                          Stroke="Black" MouseLeftButtonDown="EndIndicator_MouseLeftButtonDown" />
                    <Polygon Fill="Red" Points="-7,0 0,0 -0.5,8" MouseLeftButtonDown="EndIndicator_MouseLeftButtonDown" />
                    <Polygon Fill="Red" Points="-7,71 0,71 -0.5,63" MouseLeftButtonDown="EndIndicator_MouseLeftButtonDown" />
                </Canvas>
            </Grid>
        </Border>
        
        <Grid Grid.Row="1">
            <TextBlock Name="StartTimeLabel" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,0,0,0" />
            <TextBlock Name="EndTimeLabel" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,0,5,0" />
        </Grid>
    </Grid>
</UserControl>
